home *** CD-ROM | disk | FTP | other *** search
Text File | 1996-08-20 | 5.9 KB | 176 lines | [TEXT/MPS ] |
- # Copyright © 1995 by Apple Computer, Inc. All rights reserved.
- # SCMBuild
- #
- #FILE
- # SCMBuild
- #
- #NAME
- # PCI Slot Peek build script
- #
- #DESCRIPTION
- # This MPW Build file contains MPW Shell instructions to build
- # the PCI Slot Peek application.
- #
- #MODIFICATION HISTORY
- # Created by Terry Teague
- #
- # 20 Apr 95 - TRT - Initial version
- # 17 Jul 95 - TRT - Tidy-up source for PPCC v1.0.5, Universal Headers v2.0 final,
- # CodeWarrior 6.1.
- #
- #=============================================================================================
- #
-
- Set StartTime `Date -n`
- Echo "# Started PCISlots build at : `Date -t`"
-
- #=============================================================================================
- # Available options for this script (usage string)
- #=============================================================================================
-
- Set UsageString "∂
- SCMBuild # Build PCI Slot Peek application∂n∂
- SCMBuild [option…]∂n∂
- -H[elp] # Show this help messge∂n∂
- -68K # make a 68K only version∂n∂
- -PPC # make a PPC only version (default)∂n∂
- -FAT # make both 68K and PPC versions∂n∂
- -sprintf # use alternate sprintf/vprintf library∂n∂
- -MPW # use MPW as the development system (default)∂n∂
- -MW # use MetroWerks as the development system [not implemented yet]∂n∂
- -SC # use Symantec as the development system [not implemented yet]∂n∂
- -noUni # don't use Universal Headers (implies 68K only)∂n∂
- -UniV1 # use Universal Headers v1.0 (default)∂n∂
- -UniV2 # use Universal Headers v2.0∂n∂
- "
-
- #=============================================================================================
- # Final names of products
- #=============================================================================================
-
- Set BaseName PCISlots
-
- #=============================================================================================
- # Assume no script input parameters - set Shell variables to default options
- #=============================================================================================
-
- Set BuildName {BaseName}
- Set Build68K {BaseName}.68K
- Set BuildPPC {BaseName}.PPC
-
- Set 68K_sprintfLib ""
- Set PPC_sprintfLib ""
-
- # work around some difficulties with passing the Object folder names to Make
- Set 68K_Objects :68K_Objects:
- Set PPC_Objects :PPC_Objects:
-
- Set newParams ""
- Set ShowHelpOnly 0
-
- Set OtherMakeOptions ""
- Set PreUniHeaders "-d qPreUniHeaders=0" #set to 0 for Universal Headers
-
- # PPC (only) by default
-
- Set BuildOptions "-d Build68K="
- Set Build68K ""
-
- #=============================================================================================
- # Echo the command
- #=============================================================================================
-
- Open "{WorkSheet}"
- Echo "∂n{0} {Parameters}"
-
- #=============================================================================================
- # Process the script parameters
- #=============================================================================================
-
- For x in {"parameters"}
- If "{x}" =~ /-H(elp)«0,1»/
- Set ShowHelpOnly 1
- Else If "{x}" =~ /-68K/
- Set BuildOptions "-d BuildPPC="
- Set BuildPPC ""
- Else If "{x}" =~ /-PPC/
- Set BuildOptions "-d Build68K="
- Set Build68K ""
- Else If "{x}" =~ /-FAT/
- Set BuildOptions ""
- Set Build68K {BaseName}.68K
- Set BuildPPC {BaseName}.PPC
- Else If "{x}" =~ /-sprintf/
- Set 68K_sprintfLib "{68K_Objects}altsprintf.c.68K.o"
- Set PPC_sprintfLib "{PPC_Objects}altsprintf.c.PPC.o"
- Else If "{x}" =~ /-NoUni/
- Set PreUniHeaders "-d qPreUniHeaders=1" #set to 1 for pre-Universal Headers
- Set PPCCIncludes "{CIncludes}"
- Set BuildOptions "-d BuildPPC="
- Set BuildPPC ""
- Else If "{x}" =~ /-UniV1/
- Set PreUniHeaders "-d qPreUniHeaders=0 -d qUniHeadersV1=1" #set to 0 for Universal Headers
- Else If "{x}" =~ /-UniV2/
- Set PreUniHeaders "-d qPreUniHeaders=0 -d qUniHeadersV2=1" #set to 0 for Universal Headers
- Else
- Set newParams "{newParams} {x}"
- End
- End
-
- #=============================================================================================
- # Handle error conditions in script parameters, and handle help
- #=============================================================================================
-
- If {ShowHelpOnly}
- Echo "{UsageString}" > Dev:StdOut
- Exit 0
- End
-
- #=============================================================================================
- # Build it
- #=============================================================================================
-
- If ("{Build68K}" == "") And ("{BuildPPC}" == "")
- # build both
- Set Build68K {BaseName}.68K
- Set BuildPPC {BaseName}.PPC
- End
-
- # Options to pass to the C/C++ compilers
-
- #Set OtherCOptions "-d OtherCOptions='-d qEndUser=1'"
-
- # Options to pass to Make
- # To turn on Macsbug symbol, use -d MacsBug=full. SADE symbols, -d Symbols=full.
- # Or you can pass the option from the command line, eg., scmbuild -d Macsbug=full
-
- #Set OtherMakeOptions "-d RezOptions='-d qEndUser=1'"
-
- Set OtherMakeOptions "{BuildOptions} -d PreUniHeaders=∂'{PreUniHeaders}∂' -d 68K_sprintfLib={68K_sprintfLib} -d PPC_sprintfLib={PPC_sprintfLib}"
-
- If Not "`Exists -d {68K_Objects}`"
- NewFolder "{68K_Objects}"
- End
-
- If Not "`Exists -d {PPC_Objects}`"
- NewFolder "{PPC_Objects}"
- End
-
- Echo -n "#--->"
- Echo "::building {BuildName} using {Build68K} {BuildPPC}"
-
- BuildProgram "{BuildName}" {OtherCOptions} {OtherMakeOptions} {newParams}
-
- #=============================================================================================
- # Clean up and exit
- #=============================================================================================
-
- #Directory "{SavedDirectory}"
-
- Set EndTime `Date -n`
- Set BuildTime `Evaluate {EndTime} - {StartTime}`
- Set minutes `Evaluate {BuildTime} ÷ 60`
- Set seconds `Evaluate {BuildTime} - ({minutes} * 60)`
-
- Echo "# Build Time: {minutes} minutes {seconds} seconds"
-